var app = getApp();
var util = require('../../../../utils/util.js');
var api = require('../../../../config/api.js');

Page({
  data: {
    memberInfo: {}
  },
  onLoad: function (options) {
    let that = this;
    util.request(api.MemberCenter).then(function (res) {
      if (res.result == 1) {
        that.setData({
          memberInfo: res.data.meminfo
        });
      }
    }).catch((err) => {
      reject(err);
    });;
  },
  onReady: function () {
    // 页面渲染完成
  },
  onShow: function () {

  },
  onHide: function () {
    // 页面隐藏

  },
  onUnload: function () {
    // 页面关闭

  },
  goyouhuiquan: function () {
    wx.navigateTo({
      url: "/pages/ucenter/couponList/couponList"
    });
  },
  gojifen: function () {
    wx.navigateTo({
      url: "/pages/ucenter/jifenwater/jifenwater"
    });
  }
})